﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="CountVisit.ascx.cs" Inherits="Parts_CountVisit" %>
<div class="top-separator"></div>
<h2 class="title">Thống kê</h2>
<div>
     <%
        int count_visit=0;
         NhaKinhDoanhDataContext db = new NhaKinhDoanhDataContext();
         List<DanhMuc> dms = (from obj in db.DanhMucs                                 
                                 select obj).ToList<DanhMuc>();
         List<TaiLieu> tls = (from obj in db.TaiLieus
                              select obj).ToList<TaiLieu>();
         List<NhaCungCap> nccs = (from obj in db.NhaCungCaps
                                  select obj).ToList<NhaCungCap>();
         List<NhaMoiGioi> nmgs = (from obj in db.NhaMoiGiois
                                  select obj).ToList<NhaMoiGioi>();
         List<NhaVanChuyen> nvcs = (from obj in db.NhaVanChuyens
                                    select obj).ToList<NhaVanChuyen>();
         if(Application["count_visit"]!=null)
             count_visit=Convert.ToInt32(Application["count_visit"]);
          %>
          <p style="padding:5px; font-size: 14px;color: #336699;">Danh mục: <strong><%=dms.Count %></strong></p>
          <p style="padding:5px; font-size: 14px;color: #336699;">Tài liệu: <strong><%=tls.Count %></strong></p>
          <p style="padding:5px; font-size: 14px;color: #336699;">Nhà cung cấp: <strong><%=nccs.Count %></strong></p>
          <p style="padding:5px; font-size: 14px;color: #336699;">Nhà môi giới: <strong><%=nmgs.Count %></strong></p>
          <p style="padding:5px; font-size: 14px;color: #336699;">Nhà vận chuyển: <strong><%=nccs.Count %></strong></p>
          <p style="padding:5px; font-size: 14px;color: #336699;">Lượt truy cập: <strong><%=count_visit %></strong></p>
</div>